package NISO;
import java.awt.Dimension; 
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent; 
import javax.swing.JComponent;


public class Link extends JComponent{
	  
	protected int cBx, cBx2, cBy, cBy2; //checkBOUNDS
	protected int x, y;
	public boolean linkClicked, linkEntered;
	 //xpos, to what xpos, ypos, to what ypos, x dimension window, y dimension window, 
	public Link(int x, int x2, int y, int y2, int xPos, int yPos, int Dx, int Dy) {
	 	this.setPreferredSize(new Dimension(Dx, Dy));
	 	linkClicked = false;
	 	linkEntered = false;
		this.cBx=x;
		this.cBx2=x2;
		this.cBy=y;
		this.cBy2=y2;
		this.x=xPos;
		this.y=yPos;

		  
	}
 
	
	public boolean checkBounds(int x, int y){// pos
		if(x>=this.cBx && x<=this.cBx2 && y>=this.cBy && y<=this.cBy2)
			return true;
		else
			return false;
    }
	  
}